<div class="myRightType">
	<div class="title">
		参数设置列表
	</div>
	<div class="inner">
		<div class="box clearfix">
			<div class="row">
				
				<div class="titleFrom">
					<i class="layui-icon">&#xe628;</i>
					<span>余额监控设置</span>
				</div>
				<form class="layui-form" action="" style="margin-top: 54px;" id="ye" class="myform">
                    
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">余额：</label>
							<div class="layui-input-inline">
								<input type="number" name="balance" required lay-verify="required" placeholder="请输入余额" autocomplete="off" class="layui-input">

							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">大牛账号：</label>
							<div class="layui-input-inline">
								<input type="number" name="mtLogin" required lay-verify="required" placeholder="请输入大牛账号" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">日期：</label>
							<div class="layui-input-inline">
								<input type="text" class="layui-input" id="test1" placeholder="请选择日期" name="date">
							</div>
						</div>
						<div class="layui-inline">
							<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBalace">保存</button>
						</div>
					</div>

				</form>
				
				<div class="titleFrom">
					<i class="layui-icon">&#xe705;</i>
					<span>历史跟单金额设置</span>
				</div>
				<form class="layui-form" action="" style="margin-top: 54px;"  class="myform">
                    
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">历史跟单金额：</label>
							<div class="layui-input-inline">
								<input type="number" name="balance" required lay-verify="required" placeholder="请输入余额" autocomplete="off" class="layui-input">

							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">大牛账号：</label>
							<div class="layui-input-inline">
								<input type="number" name="mtLogin" required lay-verify="required" placeholder="请输入大牛账号" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">日期：</label>
							<div class="layui-input-inline">
								<input type="text" class="layui-input" id="test2" placeholder="请选择日期" name="date">
							</div>
						</div>
						<div class="layui-inline">
							<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveHisTory">保存</button>
						</div>
					</div>

				</form>
				<div class="titleFrom">
					<i class="layui-icon">&#xe629;</i>
					<span>盈亏监控设置</span>
				</div>
				<form class="layui-form" action="/wechat_mt5/monitor/balance " style="margin-top: 54px;" class="myform" method = 'post'>
                    
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">盈亏监控金额：</label>
							<div class="layui-input-inline">
								<input type="number" name="balance" required lay-verify="required" placeholder="请输入余额" autocomplete="off" class="layui-input">

							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">大牛账号：</label>
							<div class="layui-input-inline">
								<input type="number" name="mtLogin" required lay-verify="required" placeholder="请输入大牛账号" autocomplete="off" class="layui-input">
							</div>
						</div>
						<div class="layui-inline">
							<label class="layui-form-label">日期：</label>
							<div class="layui-input-inline">
								<input type="text" class="layui-input" id="test3" placeholder="请选择日期" name="date">
								
							</div>
						</div>
						<div class="layui-inline">
							<button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveMoreLess">保存</button>
						</div>
					</div>

				</form>
			</div>
			<br />
			<table id="fllowList" class="clearfix"></table>

		</div>
	</div>
</div>
<script>
	//Demo

	layui.use(['form', 'layedit', 'laydate'], function() {
		var form = layui.form;
		var laydate = layui.laydate;
		laydate.render({
			elem:'#test1' //指定元素
		});
		laydate.render({
			elem:'#test2' //指定元素
		});
		laydate.render({
			elem:'#test3' //指定元素
		});

		form.on('submit(saveBalace)', function(data) {
			console.log(data.field)
			$.ajax({
				type:"post",
				url:"/wechat_mt5/monitor/balance",
				data:{
					balance:data.field.balance*1,
					mtLogin:data.field.mtLogin,
					date:new Date(data.field.date)
				},
				success:function(data){
					if(data.data){
					prompt("添加成功");
						
					}


				}
			});
			return false;
		});
		
		form.on('submit(saveHisTory)', function(data) {
			console.log(data.field)
			$.ajax({
				type:"post",
				url:"/wechat_mt5/monitor/money",
				data:{
					money:data.field.balance*1,
					mtLogin:data.field.mtLogin,
					date:new Date(data.field.date)
				},
				success:function(data){
					if(data.data){
					prompt("添加成功");
						
					}


				}
			});
			return false;
		});
		
		form.on('submit(saveMoreLess)', function(data) {
			console.log(data.field)
			$.ajax({
				type:"post",
				url:"/wechat_mt5/monitor/profit",
				data:{
					profit:data.field.balance*1,
					mtLogin:data.field.mtLogin,
					date:new Date(data.field.date)
				},
				success:function(data){
					if(data.data){
					prompt("添加成功");
						
					}


				}
			});
			return false;
		});
	});
</script>